package com.amos.muexamclient.sys.service.dto;


import com.alibaba.fastjson.JSONObject;
import com.amos.core.PageDTO;
import com.amos.muexamclient.sys.entity.SysJobLogEntity;
import com.amos.muexamcore.core.MuEntity;
import com.amos.muexamcore.core.MuField;
import lombok.Data;

import java.io.Serializable;

/**
 * Copyright © 2018 五月工作室. All rights reserved.
 *
 * @Package com.amos.muexamclient.service.dto
 * @ClassName SysJobLogDTO
 * @Description TODO
 * @Author Amos
 * @Modifier
 * @Date 2020-03-24 14:35:00
 * @Version 1.0
 **/
@MuEntity(table = "sys_job_log", entity = SysJobLogEntity.class)
@Data
public class SysJobLogDTO extends PageDTO implements Serializable {

    private static final long serialVersionUID = -5927980179358469954L;
    @MuField(remark = "任务id", type = "varchar", length = 32, column = "job_id")
    private String jobId;

    @MuField(remark = "任务名称", type = "varchar", length = 64, column = "job_name")
    private String jobName;

    @MuField(remark = "任务组名", type = "varchar", length = 64, column = "job_group")
    private String jobGroup;

    @MuField(remark = "调用目标字符串", type = "varchar", length = 500, column = "invoke_target")
    private String invokeTarget;

    @MuField(remark = "日志信息", type = "varchar", length = 500, column = "job_message")
    private String jobMessage;

    @MuField(remark = "执行状态（0正常 1失败）", type = "char", length = 1, column = "status")
    private String status;

    @MuField(remark = "异常信息", type = "varchar", length = 2000, column = "exception_info")
    private String exceptionInfo;

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
